package com.jy.datapipeline.importserver.service;

import com.jy.datapipeline.common.commoninterface.EasyExcelExecutionStrategy;
import com.jy.datapipeline.common.exception.GlobalException;
import com.jy.datapipeline.common.vo.ReturnVo;
import com.jy.datapipeline.importserver.entity.ImportTask;
import org.quartz.SchedulerException;

import java.text.ParseException;
import java.util.Date;
import java.util.List;

/**
 * @类名 ImportTaskService
 * @描述 TODO
 * @作者 白条君
 * @创建日期 2023/4/18 19:07
 * @版本 1.0
 */
public interface ImportTaskService extends EasyExcelExecutionStrategy {

    ReturnVo queryByPage(Long pageNo, Long pageSize, String taskId, String taskType,
                         String targetDataSourceId, String storeId, String taskStatus,
                         String ruleId, Integer trySubtaskLoadCount, String latestStatus) throws InterruptedException;

    void addTask(ImportTask importTask) throws SchedulerException;

    ImportTask queryOneById(Long id);

    void modifyTask(ImportTask importTask) throws SchedulerException;

    void deleteTask(Long[] ids) throws SchedulerException;

    void pauseTask(Long id) throws SchedulerException;

    void resumeTask(Long[] ids) throws SchedulerException;

    void modifyTask(ImportTask importTask, Object... ignore);

    void modifyTaskByTaskId(ImportTask importTask);

    void startTask(String taskId, Date... nextStartTime) throws ParseException, SchedulerException;

    List<ImportTask> queryNames(String taskName);

    void removeTaskByRuleId(String ruleId) throws SchedulerException;
}
